// * 研发任务的所有类型定义

// 定义公共响应体
export interface Common<T> {
    code: number,
    data: T,
    msg: string
}


// 定义添加需求类型的请求参数类型
// export interface addRequirementTypeForm {
//     requirementTypeName: string
// }

// 定义创建需求的请求参数类型
export interface createRequirementForm {
    projectId: number | null,
    projectType: number | null,
    projectTitle: string,
    itemRequirementBossNameUUID: string | null,
    onlineTime: string | null,
    projectMsg: string
}

// 定义添加项目名称请求参数类型
export interface addProjectNameForm {
    itemName: string
}

// 获取需求请求参数类型
export interface searchRequirementForm {
    projectTitle: string | null,
    beginTime: "" | null,
    endTime: "" | null
}

// 获取【我负责的需求】响应参数类型
export interface postInitRequirementData {
    code: number,
    data:
    {
        avgRequirementNum: number,
        closeAvgRequirementNum: number,
        notAvgRequirementNum: number,
        requirements: null |
        Array<{
            ID: number,
            requirementBossName: string,
            requirementFatherStatus: number,
            requirementIsAvg: number,
            requirementName: string,
            requirementRelevances: string
        }>,
    }
    msg: string
}

// 获取【我的研发任务】响应参数类型
export interface postPVPRequirementData {
    code: number,
    data: Array<{
        childId: number,
        fatherId: number,
        requirementName: string,
        requirementBossName: string,
        requirementRelevances: string,
        itemRequirementWorldDetailed: string,
        contactTestNames: string,
        testUserNames: string,
        requirementChildStatus: number,
        beginTime: string,
        endTime: string,
    }>,
    msg: string
}

// 分配任务请求参数类型
export interface postAvgRequirementForm {
    itemRequirementId: number,
    endTime:any,
    devs: Array<{
        userUUID: string,
        userName: string,
        guessTime: string,
        processJob: string,
        guessProcess: string,
        processJobNum: string
    }>,
    ts: Array<{
        userUUID: string,
        userName: string,
        guessTime: string,
        processJob: string,
        guessProcess: string,
        processJobNum: string
    }>
}

// 关闭主需求请求参数类型
export interface putCloseFatherRequirementStatusForm {
    requirementId: number
}

// 撤回需求请求参数类型
export interface putReturnFatherRequirementStatusForm {
    requirementId: number
}

// 更新childStatus任务状态
export interface putUpdateRequmentStatusForm {
    requirementId: number,
    requirementStatusId: number
}

// 更新fatherStatus需求状态
export interface getNewFatherRequirementForm {
    requirementId: number
}

// 提交测试分支请求参数类型
export interface postSubmitTestRequirementForm {
    childId: null | number,
    ts: [] | Array<{
        userName: string,
        uuid: string
    }>,
    pullBranch1: string,
    pullBranch2: string,
    submitTest: string,
    itemRequirementYTOYTip: string,
    itemRequirementYTOYNumber: null | number
}

// 查询一个需求请求参数类型
export interface getRequirementForm {
    id: Number
}

// 关闭主需求请求参数类型
export interface closeFatherRequirementForm {
    requirementId: number
}

// 审核需求请求参数类型
export interface postReviewRequirementMsgForm {
    itemRequirementId: number,
    reViewContent: string,
    reViewContentNumber: null | number,
    isEnter: number
}

// 选择技术负责人请求参数类型
export interface putAddOrUpdateRequirementBossNameForm {
    itemRequirementId: number,
    nickName: string,
    uuid: string
}

// 需求评审会议纪要请求参数类型
export interface putShowNeedTipForm {
    requirementChildId: number,
    itemRequirementNeedEasy: string
}

// 获取提测人员列表响应参数类型
export interface getJoinTestData {
    nickName: string,
    id: number,
    headerImg: string,
    uuid: string,
    authorityId: number,
    userWxId: number
}

// 审核未通过，修改需求请求参数类型
export interface postAgainRequirementForm {
    itemRequirementId: null | number,
    projectId: null | number,
    projectType: null | number,
    projectTitle: string,
    onlineTime: null | string,
    projectMsg: string,
    filePaths: Array<any>
}

// 技术负责人审核详细设计请求参数
export interface putShowTipJTOYForm {
    requirementChildId: null | number,   
    itemRequirementMeetingEasy: string,
    itemRequirementGTOYTip: string,
    itemRequirementGTOYTipNumber: number,
    worldDetailedIsNext: number
}

// TODO 需求详情
// 删除已分配人员
export interface postAvgDeleteRequirementForm {
    itemRequirementId: null | number,
    devs: Array<{
        userUUID: string,
        userName: string
    }> | [],
    ts: Array<{
        userUUID: string,
        userName: string
    }> | []
};


// TODO 测试中
// 测试通过时测试对研发评分的请求参数类型
export interface putShowTipCTOYForm {
    childChildIdId: null | number,
    itemRequirementCTOYTip: string,
    itemRequirementCTOYNumber: null | number
}

// 测试不通过时处理的请求参数类型
export interface postSubmitTestStatusForm {
    childChildId: null | number,
    bugIds: Array<null | number>
}

// 需求重新提测请求参数类型
export interface submitTestRequirementTwoForm {
    requirementChildId: null | number,
    pullBranch1: string,
    pullBranch2: string,
    submitTest: string
};

// TODO 待上线评审
// 获取项目经理的待上线评审需求请求参数类型
export interface postManagerRequirementForm {
    projectTitle: string,
    beginTime: null | string,
    endTime: null | string,
    requirementStatus: number,
};

// 项目经理通知所有上线参与人线下上线评审时间请求参数类型
export interface postOfflineBearContentForm {
    requirementId: null | number,
    offlineSubmitBareTime: null | string,
};

// 获取上线评审可参与人员列表响应参数类型
export interface getSelectBareUsersFormData {
    Ts: Array<{
        userName: string,
        uuid: string
    }> | [],
    Ms: Array<{
        userName: string,
        uuid: string
    }> | [],
    Deves: Array<{
        userName: string,
        uuid: string
    }> | [],
};

// 技术负责人分配参与上线人员请求参数类型
export interface postSelectBareUsersForm {
    requirementId: null | number,
    devs: Array<{
        userName: string,
        userUUID: string,
    }> | [],
    ms: Array<{
        userName: string,
        userUUID: string,
    }> | [],
    ts: Array<{
        userName: string,
        userUUID: string,
    }> | [],
};

// 提交上线评审负责内容请求参数类型
export interface submitBearContentForm {
    requirementBearId: null | number,
    bearContent: string
};


// 项目经理填写上线评审会议纪要请求参数类型
export interface postOfflineBearContentMsgForm {
    requirementId: null | number,
    offlineSubmitBareMsg: string
};

// TODO 待上线
// 技术负责人提交上线结果，1、通过；2、不通过，请求参数类型
export interface postOfflineToEndForm {
    requirementId: null | number,
    requirementOnlineStatus: number,
    requirementOnlineMsg: string
};

// 技术负责人/测试负责人对上线参与人评分请求参数类型
export interface putOnlineEndBearContentsForm {
    requirementBearId: null | number,
    bearBossContent: string,
    bearBossUserTPNumber: null | number
}

